package com.lys.controller;

import com.lys.service.WeatherDataService;
import com.lys.vo.WeatherResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**

 */
@RestController
@RequestMapping("/weather")
public class WeatherController {
	@Autowired
	private WeatherDataService weatherDataService;
	
	@RequestMapping("/cityKey/{key}")
	public WeatherResponse getDataByCityKey(@PathVariable("key") String key) {
		return weatherDataService.getDataByCityKey(key);
	}
	

}
